perm filename DMAN.REG[UP,DOC]1 blob
sn#002755 filedate 1972-06-11 generic text, type T, neo UTF8
Dman DecTape Manager Program.
Ralph E. Gorin
27 January 1971
A new program for reading and writing dectapes
is available on the system. The program name is Dman.
The following purports to be pertinent information.
This program is designed to read and write dectapes
in the standard PDP-10 format, as compared to the PDP-6
format that is used for dectapes locally. The PDP-10 format
has the following features:
1. 573 data blocks available for file storage
2. 127 (decimal) words/block available for data
3. Up to 22 (decimal) files can be stored on one tape.
4. When a file is deleted the space that it occupied
is reclaimed, and becomes available for writing
new files.
5. Files on the tape are marked with a 9 bit protection
like disk files. Caution: since this protection
is known only to this program, it serves only to
protect against other users of this program.
Moreover, to programs like COPY, the dectapes
written by Dman look like garbage.
Although Dman does not use exactly the PDP-10 directory format,
I expect that tapes written by this program will be compatible with
standard PDP-10 systems. The extra information on the tape containing
the file protection, tape owner, password, and reel name is marked
in such a way that a standard PDP-10 will ignore it.
Tape format information.
All PDP-10 dectapes have 578 (decimal) blocks, numbered 0 thru 577.
Blocks 0,1 and 2 are reserved for a bootstrap loader. Blocks 3 thru 577
are available for data. Of these, block 100 (decimal) is reserved for the tape
directory. In tapes written by Dman, block 101 is also used.
Block 100 contains the following data.
Words 0-82 (decimal) contain the "slots".
There are seven 5-bit slots to a word. Each slot corresponds
to a block on the tape. The first slot corresponds to block 1.
Word 0 contains slots for blocks 1-7. The data marked in each slot
is simply the file number of the file to which this slot corresponds.
Files are numbered from 1-22 (decimal). If a slot is marked 0 then
it belongs to no file. If a slot is marked 37 (octal) then the block does
not exist. If marked 36 (octal) then the slot corresponds to
a block that is not available to any file, e.g. blocks 1,2, 100 and
101.
Words 83-104 contain the 22 file names, in sixbit. The {position of the
name - 82 (decimal)} is the file number corresponding to the name. It is
this number that is recorded in the slots marking the blocks that belong
to this file.
Words 105-126 contain, in the left half the file extension, in sixbit,
and in the right half the date that the file was created, in 12 bits.
Bits 18-23 are not used.
Word 127 is not used by standard PDP-10 systems. Dman will use that
word as the tape number of this reel, if not zero. This word
can be changed by the set number command.
Block 101 contains:
Word 0. The project-programmer number of the first user to write on this
tape after the directory had been zeroed. This number will be
interpreted as a sixbit name by Dman when the directory is listed.
Words 1-22.
Each of these words contains the file protection corresponding
to this file number. The protection is 9 bits in bits 0-8 in the word.
The remainder of the word is ignored.
Words 23-32. These words contain up to 60 sixbit characters. This is
the reel name of this tape.
Words 33-42. These contain the sixbit password of this tape.
The remainder of block 101 is unused.
File format:
Each file consists of some number of blocks on the tape.
Each block contains 1 word of file retrieval data and 127 words of
file data. The retrieval data is in word 0 of every file block.
It contains: BYTE (18) LINK (10) FIRST (8) COUNT.
LINK is the number of the next block in this file, or zero if
this is the last block.
FIRST is the number of the first block in this file.
Count is the number of words of data in this block. Usually this
is 177 (octal), but in the last block it is often smaller.
File retrieval:
When a file is to be read from the tape the following actions
occur. The directory is read into core. The directory is searched for
a match to the given name and extension. If a match is found then
the file number of the file is saved. Assuming that the protection
allows reading, the slots are searched from 99 back to 3 and then
from 101 forward to 577. The first time that a slot is found
that bears the same number as the file number, the corresponding block
is read. If no slot is found then the bad directory flag is raised.
Once a block has been read in, the block number of the first block
in the file is found. That block is then read, and following the
links, the file is reconstructed.
File creation.
When a file is being written on the tape the following actions
occur. Assuming that this user is allowed to write on the tape,
the directory is read into core. The directory is searched to
see if there is a file with the same name already on the tape.
If such a file is found then it is deleted, assuming that the
file protection allows deletion. The file number of the deleted
file is remembered. If no file with the same name is on the tape
then the first hole in the directory is remembered as the file
number of the file to be written. A hole in this context is defined
as a filename entry that is zero in the directory.
If no hole exists then the message "DIRECTORY FULL" will be issued.
Once a file number is selected, the slots are searched from slot 3
forward. The block corresponding to the first zero slot will
be used as the first block in the file.
The file is then written in such a manner as to cause the proper
creation of the file retrieval data, described above. If, while
writing the file, all free blocks are used, then the message
"TAPE FULL" will be typed. The file that was being written will
(almost certainly) be incomplete. The incomplete file will
contain reasonable retrieval data. The last block will contain
a Zero LINK and 177 data words.
After a file is written, the updated directory is immediatly
written back onto the tape. This assures that the tape will always
contain an accurate description of its contents. Moreover, before
any read or write request is satisfied, the directory is read. In this
way, if a new tape is mounted the program will not continue to use
the old tape's directory.
File deletion.
When a file is being deleted, the directory is read and
the file is searched for. Assuming that the file is found
and that it is not protected against deletion, then the delete
request is satisfied by:
1. Searching slots 3-577 for slots that have the same number
as this file. All such slots are marked 0.
2. The file name, extension and protection words in the
directory are zeroed.
3. The updated directory is written on the tape.
Notice that the information in the file is not destroyed
by deleting the file (or by zeroing the directory). Thus, if
you delete a file by mistake there are methods of recovering it.
Nothing will happen to the file information until another file
is written over it.
The following information is copied from the help command
texts in Dman.
BACKGROUND: THIS PROGRAM READS AND WRITES DECTAPES IN A
MODIFIED PDP-10 (NEW) FORMAT. FILES ARE TRANSFERED FROM
DISK TO DECTAPE AND FROM DECTAPE TO DISK. THE TAPE
FORMAT ALLOWS SPACE TO BE RECLAIMED WHEN A TAPE
FILE IS DELETED. ALSO THE EXTENSIONS TO THE STANDARD PDP-10
FORMAT ALLOW FILES TO BE PROTECTED IN THE SAME
WAY THAT DISK FILES ARE PROTECTED.
WHEN A FILE IS ENTERED ON A TAPE WITH ZEROED DIRECTORY
THE USER'S PROJECT-PROGRAMMER NUMBER IS ENTERED IN THE
TAPE DIRECTORY. THEREAFTER, UNTIL THE TAPE IS ZEROED
AGAIN, THE TAPE BELONGS TO THAT PROJECT-PROGRAMMER PAIR.
ONLY THE TAPE OWNER IS ALLOWED TO WRITE OR
CHANGE THE FILES THAT ARE ON THE TAPE. OTHER USERS
ARE GENERALLY ALLOWED TO READ FILES ON THE TAPE, BUT
FILES MAY BE READ PROTECTED AGAINST OTHERS.
WHEN A FILE IS ENTERED ON THE TAPE, IT IS GIVEN THE SAME
PROTECTION THAT IT HAD AS A DISK FILE. WHEN COPYING
A FILE FROM THE TAPE TO THE DISK, THE DISK FILE IS GIVEN
THE SYSTEM DEFAULT PROTECTION (055), EXCEPT AT STANFORD, WHERE
THE FILE WILL HAVE THE SAME PROTECTION THAT IT HAD ON THE TAPE.
IT IS EXPECTED THAT THIS PROGRAM WILL READ TAPES CREATED BY OTHER
PDP-10 SYSTEMS; ALSO THE TAPES WRITTEN BY THIS PROGRAM
SHOULD BE COMPATABLE WITH OTHER SYSTEMS.
DELETE COMMAND
THIS COMMAND TAKES AS ITS ARGUMENT A FILE NAME LIST
DEFINED AS FOLLOWS:
<FILE NAME LIST>::=<FILE NAME>!<FILE NAME LIST>,<FILE NAME>
<FILE NAME>::=<NAME>.<EXT>!<NAME>
<NAME> IS A 1-6 CHARACTER NAME, OR *, WHICH
IS MATCHED BY ANY NAME
<EXT> IS A 1-3 CHARACTER NAME OR *
IF THE CHARACTERS "?" "," " " "." OR "*" ARE
USED IN THE NAME EACH OCCURENCE OF THAT
CHARACTER MUST BE PRECEEDED BY THE CHARACTER "?"
IF THE TAPE HAS FILE PROTECTION AND THE CURRENT USER IS
NOT THE TAPE OWNER THEN AN ERROR MESSAGE IS TYPED.
IF THE TAPE IS UNPROTECTED OR IF THIS JOB BELONGS TO
THE TAPE OWNER THEN THE FILES THAT ARE NAMED ARE
DELETED FROM THE TAPE. IF ANY FILE IS WRITE PROTECTED AGAINST
ITS OWNER THEN IT CANNOT BE DELETED UNTIL THE PROTECTION
IS LOWERED BY RENAMEING THE FILE. IN SUCH A CASE, A MESSAGE
"PROTECTION FAILURE" FOLLOWED BY THE FILE NAME WILL BE TYPED.
TO CONTINUE TO DELETE THE REMAINDER OF THE LIST, TYPE Y<CR>.
THE EXIT COMMAND:
IN COMMAND COMPLETEION MODE, TYPE <CR> TO COMPLETE THIS COMMAND AND
EXIT. IN TERSE MODE, THE COMMAND E<CR> WILL CAUSE AN EXIT.
THE GET COMMAND.
THIS COMMAND READS FILES FROM THE DECTAPE AND WRITES THEM ON THE DISK.
THE COMMAND IS
GET <FILE NAME LIST> <CR>
THE PROGRAM RESPONDS, "WRITE ON DISK WITH NAMES: "
YOU MUST NOW TYPE THE LIST OF NAMES THAT YOU WANT THE FILES
TO HAVE WHEN THEY ARE WRITTEN ON THE DISK.
TYPE <CR> TO KEEP THE SAME NAMES.
THE DISK-NAMES ARE SEPARATED BY COMMAS. IF ANY SEQUENCE
BETWEEN COMMAS IS NULL THEN THE CORRESPONDING FILE WILL BE
COPIED WITH THE SAME NAME. BLANKS ARE IGNORED IN THE NAMES.
A TAPE-NAME MAY BE PARTIALY SPECIFIED BY THE * CONSTRUCT, HOWEVER
IF A GROUP OF FILES IS SO SPECIFIED THEY MUST BE COPIED WITH
THE SAME CORRESPONDING NAMES. THAT IS, IF YOU ASK FOR
TAPE FILES FOO.*, YOU MAY WRITE THEM WITH THE NAME BAZ.*
BUT YOU COULDN'T SPECIFY BAZ.REL OR *.REL AS THE DISK-NAME.
SUCH AN ATTEMPT WILL LEAD TO THE THE MESSAGE "ILLEGAL CORRESPONDENCE
BETWEEN NAME LISTS".
IF THE LIST OF DISK-NAMES IS SHORTER THAN THE THE LIST OF TAPE-NAMES
THEN THE EXTRA TAPE NAMES WILL BE COPIED WITH THE SAME NAMES.
THE HELP COMMAND
AFTER TYPING H, TYPE SOME LETTER<CR>. THE LETTER WILL CAUSE THE
CORRESPONDING HELP TEXT MESSAGE TO BE TYPED. FOR A LIST OF THE
THE HELP TEXT MESSAGES, TYPE T. TO RETURN
TO NORMAL COMMAND MODE FROM THE HELP SUBMODE, TYPE <ALT-MODE>.
THE INVOKE COMMAND
THIS IS FOR PEOPLE WHO WANT POWER. TYPE THE PASSWORD AND YOU WILL
BE ABLE TO DO ANYTHING THAT THE TAPE OWNER CAN DO, WITHOUT REGARD
FOR WHO THE ACTUAL TAPE OWNER IS.
THE PASSWORD IS DOCUMENTED IN THE SOURCE FILE
LIST THE DIRECTORY.
AFTER TYPING L, TYPE EITHER S<CR> OR L<CR> OR <CR>. S WILL LIST THE
SHORT FORM. OTHERWISE, YOU GET THE LONG FORM. L MEANS USE THE
LPT INSTEAD OF THE TELETYPE FOR THE LISTING. THE FORMAT IS:
<DIRECTORY [P,P]
REEL NUMBER n
REEL NAME: aaaaaaaaa> THESE LINES ONLY FOR TWO BLOCK DIRECTORIES.
k FREE BLOCKS LEFT
ffffff.eee s date <PROT> THIS LINE WILL BE REPEATED FOR
EACH FILE. SHORT FORM TYPES ONLY THE NAME.EXT AND SIZE
<PROT> WILL BE ABSENT FOR ONE BLOCK DIRECTORIES.
THE PUT COMMAND
THIS IS THE COMMAND TO READ DISK FILES AND WRITE THEM ON THE TAPE.
THE FIRST LINE OF THE PUT COMMAND SHOULD BE COMPLETED
BY TYPING A LIST OF DISK FILES TO BE WRITTEN ON THE TAPE.
THE NEXT LINE WILL ASK FOR THE NAMES THAT YOU WANT TO USE
IN WRITING THE FILES ON THE TAPE.
THE SAME RULES APPLY TO THE TAPE-NAMES IN THIS COMMAND THAT
APPLY TO THE DISK-NAMES IN THE GET COMMAND.
TAPES CAN ONLY BE WRITTEN ON BY THEIR OWNER.
IF THE OWNER ATTEMPTS TO REWRITE A TAPE-FILE,
I.E., WRITE A FILE WITH A NAME THAT ALREADY EXISTS IN THE
DIRECTORY, THE EXISTING FILE WILL BE DELETED FROM THE TAPE
BEFORE THE DISK FILE IS COPIED. (THE OLD COPY WILL BE DELETED
ONLY IF IT IS NOT WRITE-PROTECTED AGAINST THE TAPE OWNER).
THIS WILL NOT CAUSE PROBLEMS UNLESS THE CORRESPONDING
DISK FILE IS GARBAGED
(IN THE EVENT THAT A FILE WILL NOT FIT ON THE TAPE
THE MESSAGE "TAPE FULL" WILL RESULT, AND AS MUCH OF
THE FILE THAT FITS WILL BE ON THE TAPE. NEEDLESS TO SAY,
THE ENTIRE FILE WILL STILL BE ON THE DISK.)
IF AN ATTEMPT IS MADE TO WRITE MORE THAN 22 FILES
ON THE TAPE, THE MESSAGE "DIRECTORY FULL" WILL RESULT.
THIS MEANS THAT YOU MUST DELETE SOMETHING FROM THE TAPE
(EVEN THOUGH THERE IS STILL ROOM ON THE TAPE,
BECAUSE THERE IS NO ROOM IN THE DIRECTORY.
THE RENAME COMMAND TAKES A SINGLE FILE NAME AS ARGUMENT.
AFTER THE NAME, TYPE <CR>
YOU WILL BE ASKED FOR THE NEW NAME, THE
NEW EXTENSION AND THE NEW FILE PROTECTION, ONE AT A TIME.
TO KEEP THE SAME NAME,EXTENSION OR PROTECTION,
TYPE <CR> TO THE CORRESPONDING QUESTION.
TO BLANK AN EXTENSION TYPE "? ". IF YOU BLANK
THE FILE NAME, THAT IS EQUIVALENT TO DELTEING THE FILE.
A NEW PROTECTION SHOULD BE ONLY 3 OCTAL DIGITS.
RENAME IS ALLOWED ONLY BY THE TAPE-OWNER.
IF A FILE IS WRITE-PROTECTED AGAINST ITS OWNER, THEN
THE OWNER IS ONLY ALLOWED TO RENAME IT TO THE SAME NAME,
WITH A NEW PROTECTION. ONCE THE PROTECTION IS LOWERED
THE OWNER CAN THEN DELETE, REWRITE OR RENAME THE FILE.
RENAME WILL ALSO ACCEPT THE * CONSTRUCT IN A FILE
NAME. THE USUAL RULES OF CORRESPONDENCE MUST APPLY.
THE SET COMMAND
THE SET COMMAND TAKES A SINGLE LETTER ARGUMENT, FOLLOWED BY <CR>
THE SUBCOMMANDS ARE:
D SET DEVICE NAME - SELECT A NEW PHYSICAL DEVICE AS THE DECTAPE
OF INTEREST.
P SET PROJECT-PROGRAMMER NUMBER
IF THIS USER IS THE TAPE OWNER
OR IF HE KNOWS THE TAPE KEYWORD THEN A NEW
PROJECT-PROGRAMMER PAIR WILL BE WRITTEN ON THE
TAPE AS THE OWNER.
K SET KEYWORD
IF THIS USER IS THE OWNER OR IF HE KNOWS THE OLD
KEYWORD THEN A NEW KEYWORD IS ACCEPTED AND
WRITTEN ON THE TAPE.
R SET REELNAME
IF THIS USER IS THE OWNER, OR IF HE KNOWS THE KEYWORD,
THEN A NEW LOGICAL NAME FOR THE REEL IS ACCEPTED
AND WRITTEN ON THE TAPE.
N SET NUMBER OF THIS REEL.
IF THIS USER IS THE TAPE OWNER OR IF HE KNOWS THE
KEYWORD, THEN A NEW REEL NUMBER FOR THIS TAPE WILL
BE ACCEPTED. THIS NUMBER WILL BE INTERPRETED AS DECIMAL.
TABLE OF HELP SUBMODE MESSAGES
TYPE THE LETTER TO GET THE CORREPSONDING MESSAGE.
TYPE <ALTMODE> TO LEAVE THE HELP SUBMODE.
T THIS TABLE
B GENERAL BACKGROUND
D DELETE COMMAND
E EXIT COMMAND
G GET FILES FROM TAPE TO DISK COMMAND
H HELP ABOUT HELP
I INVOKE
L LIST DIRECTORY
P PUT FILES ON TAPE FROM DISK
R RENAME TAPE FILE
S SET STUFF
U UNLOAD TAPE
V VERBOSE-TERSE COMMANDS
Z ZERO TAPE DIRECTORY
UNLOAD COMMAND
THIS WILL CAUSE THE TAPE TO BE SPUN OFF THE DRIVE WITH ALL
THE TAPE WOUND ON THE LEFT HAND REEL.
<THIS IS NOT AVAILABLE AT STANFORD>
THE TERSE AND VERBOSE COMMANDS
THIS PROGRAM STARTS IN VERBOSE, COMMAND COMPLETION
MODE, E.G. AFTER YOU TYPE "V" THE PROGRAM COMPLETES: "ERBOSE" .
TO SHUT THIS OFF, USE THE TERSE, T COMMAND. TO REINSTATE IT
USE THE V COMMAND.
NOTE THAT AFTER A COMMAND NAME IS TYPED
YOU USUALLY ADD ARGUMENTS AND THEN <CR>. IF AN <ALTMODE> IS TYPED
IT WILL CANCEL THE COMMAND (LIKE ↑U) AND RETURN YOU TO COMMAND MODE.
ZERO THE TAPE DIRECTORY
TYPE <CR> AFTER THE Z TO COMPLETE THIS COMMAND.
YOU WILL THEN BE ASKED TO CONFIRM, DO THIS BY TYPING Y<CR>
IF THE TAPE HAS A PROTECTED DIECTORY THEN ONLY THE TAPE OWNER
CAN ZERO HIS DIRECTORY, AND THEN ONLY IF
NONE OF THE FILES ARE WRITE PROTECTED AGAINST HIMSELF.
THE DISTINCTION BETWEEN ZEROING A DIRECTORY AND DELETING
ALL THE FILES IS AS FOLLOWS:
1. ZEROING WILL WORK IF THE DIRECTORY IS GARBARGE
WHEREAS DELETE *.* REQUIRES A GOOD DIRECTORY.
2. DELETE *.* DOES NOT ERASE INFORMATION REGARDING
THE OWNER PPN,THE REEL NAME, THE REEL PASSWORD
WHEREAS ZEROING DESTROYS ALL THAT INFORMATION.
3. IF A TAPE WITH A ONE-BLOCK, STANDARD PDP-10 DIRECTORY IS
WRITTEN ON BY THIS PROGRAM WHEN ITS DIRECTORY
IS EMPTY, THAT TAPE WILL BE CONVERTED TO THE TWO BLOCK
DIRECTORY FORMAT.